/**
 * Copyright (C) 2021 - 2031 O-Cubes Co., Ltd.
 */

/****************************************************************
 *  @file    SysCounter_test.c
 *  @brief   SysCounter testcase source file
 *  @version v1.0
 *  @date    03. Apr. 2023
 ****************************************************************/

#include "printf.h"
#include "hal_api.h"

#define SYSCNT_DELAY_USEC (1000*1000)
#define SYSCNT_DELAY_MSEC (1000)

int32_t test_syscounter(void)
{
	printf("\r\n[SYSCOUNTER]: TEST START\r\n");

	printf("[SYSCOUNTER]: Get Timestamp %llu\r\n", Hal_Cnt_GetTimestamp());
	Hal_Cnt_DelayUs(SYSCNT_DELAY_USEC);
	printf("[SYSCOUNTER]: DelayUs finish\r\n");
	Hal_Cnt_DelayMs(SYSCNT_DELAY_MSEC);
	printf("[SYSCOUNTER]: DelayMs finish\r\n");
	printf("[SYSCOUNTER]: Get Timestamp %llu\r\n", Hal_Cnt_GetTimestamp());

	printf("[SYSCOUNTER]: TEST END\r\n");

	return 0;
}
